module(
    name = "bazel_difftools",
    version = "0.3.0",
)

# -------------------------------------------------------------------
# Bazel Dependencies
# -------------------------------------------------------------------

bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_go", version = "0.57.0")
bazel_dep(name = "gazelle", version = "0.45.0")
bazel_dep(name = "build_stack_rules_proto", version = "4.1.1")

# -------------------------------------------------------------------
# Configuration: Go
# -------------------------------------------------------------------

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(go_mod = "//:go.mod")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_bazelapis_src_main_protobuf_analysis_v2",
    "com_github_google_go_cmp",
    "com_github_hexops_gotextdiff",
    "org_golang_google_protobuf",
)

# -------------------------------------------------------------------
# Configuration: Protobuf Deps
# -------------------------------------------------------------------

proto_repository = use_extension("@build_stack_rules_proto//extensions:proto_repository.bzl", "proto_repository")
proto_repository.archive(
    name = "protobufapis",
    build_directives = [
        "gazelle:exclude testdata",
        "gazelle:exclude google/protobuf/compiler/ruby",
        "gazelle:exclude google/protobuf/bridge",
        "gazelle:exclude google/protobuf/util/internal/testdata",
        "gazelle:proto_language cpp enable true",
        "gazelle:proto_language descriptor enable true",
        "gazelle:proto_language go enable true",
        "gazelle:proto_language java enable true",
        "gazelle:proto_language python enable true",
        "gazelle:proto_go_modules_index_kind proto_go_library",
        "gazelle:proto_language scala enable true",
    ],
    build_file_generation = "clean",
    build_file_proto_mode = "file",
    cfgs = ["//:rules_proto_config.yaml"],
    deleted_files = [
        "google/protobuf/*test*.proto",
        "google/protobuf/*unittest*.proto",
        "google/protobuf/late*.proto",
        "google/protobuf/sample*.proto",
        "google/protobuf/cpp_features.proto",
        "google/protobuf/internal_options.proto",
        "google/protobuf/compiler/cpp/*test*.proto",
        "google/protobuf/util/*test*.proto",
        "google/protobuf/util/*unittest*.proto",
        "google/protobuf/util/json_format*.proto",
    ],
    sha256 = "bb1fd58473c47c747a3f00fc45ced1d562bba4bf645db07cc889fe86dee279ca",
    strip_prefix = "protobuf-4fbd1111a292d04746c732573025e3251de0bb9c/src",
    urls = ["https://github.com/protocolbuffers/protobuf/archive/4fbd1111a292d04746c732573025e3251de0bb9c.tar.gz"],
)

# Commit: 60e1300d4a0b60b85b3df167ddc4062ac7cc4f44
# Date: 2025-09-08 18:27:45 +0000 UTC
# URL: https://github.com/googleapis/googleapis/commit/60e1300d4a0b60b85b3df167ddc4062ac7cc4f44
#
# feat: release initial client libraries for Cloud Location Finder (https://cloud.google.com/location-finder)
#
# Clients can now use this v1 client library via the following methods: ListCloudLocations, GetCloudLocation, SearchCloudLocations
#
# PiperOrigin-RevId: 804516757
# Size: 11515047 (12 MB)
proto_repository.archive(
    name = "googleapis",
    build_directives = [
        "gazelle:exclude google/ads/googleads/v19/services",
        "gazelle:exclude google/ads/googleads/v20/services",
        "gazelle:exclude google/ads/googleads/v21/services",
        "gazelle:exclude google/ads/googleads/v7/services",
        "gazelle:exclude google/ads/googleads/v8/services",
        "gazelle:exclude google/cloud/recommendationengine/v1beta1",
        "gazelle:exclude google/devtools/containeranalysis/v1beta1",
        "gazelle:exclude google/example",
        "gazelle:exclude google/maps/weather/v1",
        "gazelle:proto_go_modules_index_kind proto_go_library",
        "gazelle:proto_language cpp enable true",
        "gazelle:proto_language descriptor enable true",
        "gazelle:proto_language go enable true",
        "gazelle:proto_language java enable true",
        "gazelle:proto_language python enable true",
        "gazelle:proto_language scala enable true",
    ],
    build_file_generation = "clean",
    build_file_proto_mode = "file",
    cfgs = ["//:rules_proto_config.yaml"],
    imports = ["@protobufapis//:imports.csv"],
    reresolve_known_proto_imports = True,
    sha256 = "b1f729e116312e1bed9a6c0b812e8d6071755dcf93ff4f665c07bbf517dd61a6",
    strip_prefix = "googleapis-60e1300d4a0b60b85b3df167ddc4062ac7cc4f44",
    urls = ["https://github.com/googleapis/googleapis/archive/60e1300d4a0b60b85b3df167ddc4062ac7cc4f44.tar.gz"],
)

# Commit: 6777112ef7defa6705b1ebd2831d6c7efeb12ba2
# Date: 2024-09-26 07:13:55 +0000 UTC
# URL: https://github.com/bazelbuild/remote-apis/commit/6777112ef7defa6705b1ebd2831d6c7efeb12ba2
#
# Improve phrasing of digest_function added in #311 (#312)
#
# - Unlike the other messages where a digest_function field was added,
#   ExecuteActionMetadata is returned by the server to the client. This
#   means that the words "client" and "server" need to be swapped around
#   in some but not all places.
#
# - To ensure backward compatibility, we permit digest functions that were
#   defined at the time this field was added to remain unset. When the
#   digest_function fields were added to the other messages, the last one
#   to be added was MURMUR3. In the meantime we've added BLAKE3 and
#   SHA256TREE, so for this specific field we must list those as well.
# Size: 136595 (137 kB)
proto_repository.archive(
    name = "remoteapis",
    build_directives = [
        "gazelle:exclude third_party",
        "gazelle:proto_go_modules_index_kind proto_go_library",
        "gazelle:proto_language go enable true",
    ],
    build_file_generation = "clean",
    build_file_proto_mode = "file",
    cfgs = ["//:rules_proto_config.yaml"],
    imports = [
        "@googleapis//:imports.csv",
        "@protobufapis//:imports.csv",
    ],
    sha256 = "7b6847779f18fe0a586c8629b9347cf5e54edb0c9fb7cd7b56c489c0209409c2",
    strip_prefix = "remote-apis-6777112ef7defa6705b1ebd2831d6c7efeb12ba2",
    urls = ["https://github.com/bazelbuild/remote-apis/archive/6777112ef7defa6705b1ebd2831d6c7efeb12ba2.tar.gz"],
)

# Commit: 526225e836561307065f2389c9e2163064fda084
# Date: 2025-09-04 17:49:52 +0000 UTC
# URL: https://github.com/bazelbuild/bazel/commit/526225e836561307065f2389c9e2163064fda084
#
# Release 8.4.0 (2025-09-04)
#
# Release Notes:
# Size: 23065443 (23 MB)
proto_repository.archive(
    name = "bazelapis",
    build_directives = [
        "gazelle:exclude src/java_tools/import_deps_checker/javatests/com/google/devtools/build/importdeps/testdata",
        "gazelle:exclude src/tools/android/java/com/google/devtools/build/android",
        "gazelle:exclude third_party",
        "gazelle:proto_go_modules_index_kind proto_go_library",
        "gazelle:proto_language go enable true",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/stardoc_output.proto=github.com/bazelbuild/bazel/src/main/protobuf/stardoc_output",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/java/com/google/devtools/build/lib/packages/metrics/package_load_metrics.proto=github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/packages/metrics",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/strategy_policy.proto=github.com/bazelbuild/bazel/src/main/protobuf/strategy_policy",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/execution_graph.proto=github.com/bazelbuild/bazel/src/main/protobuf/execution_graph",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/remote_scrubbing.proto=github.com/bazelbuild/bazel/src/main/protobuf/remote_scrubbing",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/memory_pressure.proto=github.com/bazelbuild/bazel/src/main/protobuf/memory_pressure",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/cache_salt.proto=github.com/bazelbuild/bazel/src/main/protobuf/cache_salt",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/crash_debugging.proto=github.com/bazelbuild/bazel/src/main/protobuf/crash_debugging",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/file_invalidation_data.proto=github.com/bazelbuild/bazel/src/main/protobuf/file_invalidation_data",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/bazel_output_service.proto=github.com/bazelbuild/bazel/src/main/protobuf/bazel_output_service",
        "gazelle:proto_plugin protoc-gen-go option Msrc/main/protobuf/bazel_output_service_rev2.proto=github.com/bazelbuild/bazel/src/main/protobuf/bazel_output_service_rev2",
    ],
    build_file_generation = "clean",
    build_file_proto_mode = "file",
    cfgs = ["//:rules_proto_config.yaml"],
    deleted_files = [
        "src/main/protobuf/bazel_output_service.proto",
    ],
    imports = [
        "@googleapis//:imports.csv",
        "@protobufapis//:imports.csv",
        "@remoteapis//:imports.csv",
    ],
    sha256 = "6037e5df4d97c1402298e19f0c511ae5f44757c1df2e92faad0b2a25c24ae2f8",
    strip_prefix = "bazel-526225e836561307065f2389c9e2163064fda084",
    urls = ["https://github.com/bazelbuild/bazel/archive/526225e836561307065f2389c9e2163064fda084.tar.gz"],
)
use_repo(
    proto_repository,
    "bazelapis",
    "googleapis",
    "protobufapis",
    "remoteapis",
)
